package cn.edu.zut.service;

import cn.edu.zut.domin.Reader;

import java.util.List;

public interface IReaderService {
    /**
     * 查询所有
     * @return
     * @throws Exception
     */
    public List<Reader> findAll(int page, int size) throws Exception;

    /**
     * 查询一本书ById
     * @return
     * @throws Exception
     */
    public List<Reader> findReaderById(String id) throws Exception;

    /**
     * 保存一本书
     * @param reader
     * @throws Exception
     */
    public void saveReader(Reader reader) throws Exception;

    /**
     * 删除一本书
     * @param id
     * @throws Exception
     */
    public void deleteReader(String id) throws Exception;

    public void updateReader(Reader reader) throws Exception;
    public List<Reader> selectBookLendInfoByReaderId(String Id);
    public List<Reader> selectAllBookLendInfoByReaderId();

    /**
     * 根据名字查读者
     * @param userName
     * @return
     */
    public List<Reader> findReaderByName(String userName);

    public List<Reader> findByReaderTel(String tel);
    public List<Reader> findReaderByNameMOHU(String name);

    /**
     * 根据id查询读者
     * @param id
     * @return
     */
    public Reader findReaderById1(String id);
}
